package org.jeecg.modules.htxincailiao.enterprise.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.htxincailiao.enterprise.domain.vo.HTEnterpriseVO;

public interface HTEnterpriseMapper {
        final static String MULTIPLE_FACTOR_SELECT_FIELD = "(SELECT id, account_type," +
                "seo_keywords, seo_description, industry_category_id, username, phone_number, email,introduction,enterprise_address_id,cover,logo,business_model_id,registered_capital, yearly_turnover, audit_status, is_locked FROM ";
        final static String ID_CONDITIONS = " WHERE id=#{id})";

        @Select("<script>" +
                MULTIPLE_FACTOR_SELECT_FIELD + "ht_merchant"+  ID_CONDITIONS + "UNION"+
                MULTIPLE_FACTOR_SELECT_FIELD + "ht_evaluation_agency"+  ID_CONDITIONS + "UNION"+
                MULTIPLE_FACTOR_SELECT_FIELD + "ht_alliance"+  ID_CONDITIONS + "UNION"+
                MULTIPLE_FACTOR_SELECT_FIELD + "ht_alliance_member"+  ID_CONDITIONS +
                "</script>")
        HTEnterpriseVO queryById(@Param("id") String enterpriseId);


}
